1. Field of the Invention
The subject invention relates to a Peer-to-Peer (P2P) network, a method and a computer program for a new node joining the network, and a computer readable medium thereof, specifically to a Peer-to-Peer network established by a plurality of nodes, each of the nodes able to transmit information to each other, a method and a computer program for a new node joining the network, and a computer readable medium thereof.
2. Descriptions of the Related Art
In the present P2P network architecture, a video streaming technique usually divides a video sequence of an image signal into a lot of video segments. A node intended to watch the video segments needs to join the P2P network group owning the video first, and then, requests the intended video segments for playing.
However, due to a limited bandwidth and a jammed condition of the network, almost every node can not receive all video segments. Therefore, the node in the network usually switches to request other nodes of the network for the video segments it lacks. At this time, nodes capable of being requested are called partner nodes of that node and there is a partnership between that node and the partner nodes. To form the partnership among nodes means how a node finds out one of other nodes agreeing the request and being capable of providing services to it and to become its partner node. The present technique for forming the P2P partnership is a peer-to-peer membership management for gossip-based protocol (also called a Scalable Membership Protocol, SCAMP).
The above-mentioned SCAMP is a gossip-based protocol utilizing a method of exchanging a state for spreading messages to achieve a purpose of finding out partners. Each node using the SCAMP comprises two kinds of data structures internally: a PartialView and an InView. The PartialView is used to record the node for providing video segments. In other words, a node can receive data from the nodes recorded in the PartialView. The node which provides video segments is defined as a providing peer or a partner. The InView is used to record the node receiving video segments. In other words, a node can transmit data to the nodes recorded in the InView. That node receiving data is called a consuming peer. Although messages can be transmitted quickly to each node in the P2P network by using this method, a stability of the P2P network depends on a success ratio of message transmission. Therefore, the method sometimes causes video data lost or the stability of the network decreasing and further makes the P2P network unstable and unreliable.
An example is shown below for explaining an operation principle of the SCAMP, that is, how to join a node to the P2P network and to find out the partner and to become a partner of other nodes. Please refer to FIG. 1. Nodes N1, N2, . . . , N6 are existed nodes in the P2P network. A direction indicated by each arrow is the direction of a joining message which flows, while the direction of the joining message flows in an opposite direction of a data which flows. The description of the joining message will be explained later. In this example, the node N1 comprises five partner nodes, nodes N2, N3 and N6, respectively. The node N7 is a new node which desire to join the P2P network. First, the node N7 randomly chooses a contact node. The contact node is N1 in this embodiment. At the meantime, the node N7 transmits a joining message to the node N1 for requesting to join, and adds the node N1 to the PartialView of the N7. When the node N1 receives the joining message, the node N1 transmits the joining message to all its partners (N2, N3 to N6) by broadcasting. Every node receiving the joining message from the node N7 determines whether to add the node N7 to its PartialView. If one node determines not to join the node N7 to its PartialView, one of its partner nodes is randomly chosen from its PartialView and transmits the joining message of requesting to join to the partner node it randomly chooses. The randomly chosen partner node will re-determine whether to accept a joining request of the node N7. In the example, the nodes N3 and N6 determine to accept the joining request of the node N7, and the node N7 is added to their corresponding PartialViews, respectively. The nodes N2, N4 and N5 determine not to add the node N7 to their corresponding PartialViews, respectively. Therefore, the nodes N2, N4 and N5 each will transmit the joining request message according to the method mentioned above.
According the aforementioned descriptions, the random way is used for determining whether the new node joins to the P2P network. The random way affects a loading balance of the entire P2P network. For example, it is possible that a node with a large number of partner nodes still accepts a new node to become its partner in the P2P network, while other nodes may lost an opportunity of adding partners. The possibility for the group disconnection in the P2P network and the instability of the P2P network will increase. Consequently, how to enhance the stability of the P2P network and to balance the loading is an essential goal for the industry to improve.